package vn.co.thn.web.hotvideo.api;

import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import vn.co.thn.web.hotvideo.data.jpa.Devices;
import vn.co.thn.web.hotvideo.model.DevicesModel;

import com.google.gson.Gson;

@Path("/devices")
public class ApiDevices {
	@Path("/add")
	@POST
	@Produces("application/json")
	public String Add(@FormParam("DeviceId") String DeviceId) {
		Devices obj = new Devices();
		DevicesModel devicesModel = new DevicesModel();
		obj.setDeviceId(DeviceId);
		devicesModel.Add(obj);
		return new Gson().toJson(obj);
	}
}
